/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package com.thinkgem.jeesite.modules.duty.entity;

import org.hibernate.validator.constraints.Length;
import com.thinkgem.jeesite.modules.sys.entity.User;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 维修记录Entity
 * @author johnKee
 * @version 2016-07-17
 */
public class ZlmtMaintenanceRecord extends DataEntity<ZlmtMaintenanceRecord> {
	
	private static final long serialVersionUID = 1L;
	private String hostid;		// 主机id
	private String hostname;		// 主机名
	private String alias;		// 别名
	private String accessoryId;		// 配件id
	private User user;		// 用户id
	private String maintenanceReason;		// 运维原因
	private String maintenanceOperation;		// 运维操作记录
	private String maintenanceResult;		// 运维结果
	private Date fromTime;		// 开始时间
	private Date thruTime;		// 结束时间
	private String remark;		// 备注

	private String accessoryName;
	
	public ZlmtMaintenanceRecord() {
		super();
	}

	public ZlmtMaintenanceRecord(String id){
		super(id);
	}

	@Length(min=1, max=64, message="主机id长度必须介于 1 和 64 之间")
	public String getHostid() {
		return hostid;
	}

	public void setHostid(String hostid) {
		this.hostid = hostid;
	}
	
	@Length(min=0, max=128, message="主机名长度必须介于 0 和 128 之间")
	public String getHostname() {
		return hostname;
	}

	public void setHostname(String hostname) {
		this.hostname = hostname;
	}
	
	@Length(min=1, max=128, message="别名长度必须介于 1 和 128 之间")
	public String getAlias() {
		return alias;
	}

	public void setAlias(String alias) {
		this.alias = alias;
	}
	
	@Length(min=0, max=64, message="配件id长度必须介于 0 和 64 之间")
	public String getAccessoryId() {
		return accessoryId;
	}

	public void setAccessoryId(String accessoryId) {
		this.accessoryId = accessoryId;
	}
	
	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}
	
	@Length(min=0, max=256, message="运维原因长度必须介于 0 和 256 之间")
	public String getMaintenanceReason() {
		return maintenanceReason;
	}

	public void setMaintenanceReason(String maintenanceReason) {
		this.maintenanceReason = maintenanceReason;
	}
	
	@Length(min=0, max=256, message="运维操作记录长度必须介于 0 和 256 之间")
	public String getMaintenanceOperation() {
		return maintenanceOperation;
	}

	public void setMaintenanceOperation(String maintenanceOperation) {
		this.maintenanceOperation = maintenanceOperation;
	}
	
	@Length(min=0, max=64, message="运维结果长度必须介于 0 和 64 之间")
	public String getMaintenanceResult() {
		return maintenanceResult;
	}

	public void setMaintenanceResult(String maintenanceResult) {
		this.maintenanceResult = maintenanceResult;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getFromTime() {
		return fromTime;
	}

	public void setFromTime(Date fromTime) {
		this.fromTime = fromTime;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getThruTime() {
		return thruTime;
	}

	public void setThruTime(Date thruTime) {
		this.thruTime = thruTime;
	}
	
	@Length(min=0, max=256, message="备注长度必须介于 0 和 256 之间")
	public String getRemark() {
		return remark;
	}

	public void setRemark(String remark) {
		this.remark = remark;
	}

	public String getAccessoryName() {
		return accessoryName;
	}

	public void setAccessoryName(String accessoryName) {
		this.accessoryName = accessoryName;
	}
}